@use "../variables";

.advantages {
  margin-bottom: 119px;

  @media (max-width: variables.$vp-max-tablet) {
    margin-bottom: 75px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    margin-bottom: 46px;
  }
}

.advantages__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 31px;
  row-gap: 30px;
  margin: 0;
  padding: 0;

  @media (max-width: variables.$vp-max-tablet) {
    column-gap: 29px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    display: flex;
    flex-direction: column;
  }
}

.advantages__item {
  position: relative;
  min-height: 300px;
  margin: 0 0 0 5px;
  padding: 39px 44px 60px 39px;
  border: 1px solid variables.$color-whisper;
  border-left: none;
  box-shadow: -5px 0 0 0 variables.$color-sky-blue;

  h3 {
    font-family: variables.$ff-roboto-condensed;
    margin: 0 0 14px;
    padding: 0;
    font-weight: 400;
    font-size: 24px;
    line-height: 34px;
    color: variables.$color-sky-blue;

    @media (max-width: variables.$vp-max-tablet) {
      margin-bottom: 10px;
    }

    @media (max-width: variables.$vp-max-mobile) {
      margin-bottom: 6px;
      font-size: 20px;
    }
  }

  svg {
    display: block;
    margin-bottom: 21px;
    width: 35px;
    height: 35px;
    color: variables.$color-sky-blue;

    @media (max-width: variables.$vp-max-tablet) {
      margin-bottom: 15px;
    }

    @media (max-width: variables.$vp-max-mobile) {
      margin-bottom: 13px;
      width: 30px;
      height: 30px;
    }
  }

  p {
    margin: 0 0 10px;
    padding: 0;
    color: variables.$color-pearl;
    font-family: variables.$ff-pt-mono;
    font-weight: 400;
    font-size: 16px;
    line-height: 21px;

    @media (max-width: variables.$vp-max-tablet) {
      line-height: 21.5px;
    }

    @media (max-width: variables.$vp-max-mobile) {
      font-size: 14px;
      line-height: 19px;
    }
  }

  &:hover {
    border: 1px solid transparent;
    background-color: variables.$color-sky-blue;

    h3,
    p {
      color: variables.$color-alice-blue;
    }

    svg {
      color: variables.$color-alice-blue;
    }
  }

  @media (max-width: variables.$vp-max-tablet) {
    min-height: 360px;
    margin-left: 5px;
    padding: 39px 44px 10px 39px;

    &:nth-of-type(3n) h3 {
      margin-bottom: 5px;
    }

    &:nth-of-type(4n) h3 {
      margin-bottom: 2px;
    }

    &:nth-of-type(3n) p,
    &:nth-of-type(4n) p {
      padding-bottom: 41px;
    }
  }

  @media (max-width: variables.$vp-max-mobile) {
    margin-left: 5px;
    padding: 29px 24px 10px;

    &:nth-of-type(n),
    &:nth-of-type(2n) {
      min-height: 340px;
    }

    &:nth-of-type(3n),
    &:nth-of-type(4n) {
      min-height: 325px;

      svg {
        margin-bottom: 19px;
      }

      h3 {
        line-height: 28px;
        margin-bottom: 13px;
      }
    }
  }
}
